package com.butang.mapper;

import com.butang.pojo.Dept;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * ClassName: DempMapper
 * Package: com.butang.mapper
 * Description:
 *
 * @Author BuTang
 * @Create 2023/7/9 22:48
 * @Version 1.0
 */

@Mapper
public interface DeptMapper {

    @Select(" select  * from dept ")
    List<Dept> list();
    @Delete("delete  from  dept where id = #{id} ")
    void delete(Integer id);

    @Insert("insert into dept (name, create_time, update_time) values (#{name},#{createTime},#{updateTime})")
    void insert(Dept dept);

    @Update("update  dept set name = #{name} where id = #{id} ")
    void update(Dept dept);

    @Select("select * from management.dept where id = #{id} ")
    Dept idSelect(Integer id);
//    @Insert("insert into dept value ")

}
